package com.rx.service;

import java.util.List;
import java.util.Map;

import com.rx.dao.PicturesDaoAbstract;
import com.rx.dao.PicturesDaoImpl;
import com.rx.entity.Pictures;

public class PicturesServiceImpl implements PicturesServiceI<Pictures>{
	private static PicturesDaoAbstract pda=new PicturesDaoImpl();
	
	@Override
	public boolean add(Pictures t) throws Exception {
		return pda.insert(t);
	}

	@Override
	public boolean modify(Pictures t) throws Exception {
		return pda.update(t);
	}

	@Override
	public boolean remove(int id) throws Exception {
		return pda.delete(id);
	}

	@Override
	public List<Pictures> getAll() throws Exception {	
		return pda.selectAll();
	}

	@Override
	public Map<String, Object> getPageAll(int currentPage, int pageSize) throws Exception {
		return pda.selectPage("", currentPage, pageSize);
	}

}
